//
//  DKBankTableCell.m
//  DanKU
//
//  Created by 吴斌 on 2023/12/6.
//

#import "DKBankTableCell.h"

static NSString * DKBankTableCellId = @"DKBankTableCellId";
@interface DKBankTableCell()
@property (nonatomic, strong)UILabel * dk_BankNameLab;
@end
@implementation DKBankTableCell
+ (instancetype)bankTableCell:(UITableView *)tableView{
    DKBankTableCell * dk_BankTableCell = [tableView dequeueReusableCellWithIdentifier:DKBankTableCellId];
    if (!dk_BankTableCell) {
        dk_BankTableCell = [[DKBankTableCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:DKBankTableCellId];
    }
    dk_BankTableCell.backgroundColor = [UIColor clearColor];
    dk_BankTableCell.selectionStyle = UITableViewCellSelectionStyleNone;
    dk_BankTableCell.accessoryType = UITableViewCellAccessoryNone;
    return dk_BankTableCell;
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self dk_addSubView];
    }
    return self;
}
- (void)dk_addSubView{
    self.dk_BankNameLab = [[UILabel alloc] init];
    self.dk_BankNameLab.textColor = DK_Hex(@"#333333");
    self.dk_BankNameLab.font = DK_FONT_Medium(14);
    [self.contentView addSubview:self.dk_BankNameLab];
    [self.dk_BankNameLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@(DK_IsWidthScale(15)));
        make.right.equalTo(@(-DK_IsWidthScale(15)));
        make.top.equalTo(@(DK_IsWidthScale(0)));
        make.bottom.equalTo(@(DK_IsWidthScale(0)));
    }];
}
-(void)setBankName:(NSString *)bankName{
    _bankName = bankName;
    self.dk_BankNameLab.text = _bankName;
}
@end
